# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=frameworkintegration
pkgver=5.73.0
pkgrel=0
pkgdesc="Framework providing components to allow applications to integrate with a KDE Workspace"
arch="all !armhf" # armhf blocked by extra-cmake-modules
url="https://www.kde.org"
license="LGPL-2.1-or-later"
depends_dev="qt5-qtbase-dev kconfig-dev kconfigwidgets-dev kiconthemes-dev knotifications-dev knewstuff-dev kwidgetsaddons-dev kpackage-dev ki18n-dev appstream-dev"
makedepends="$depends_dev extra-cmake-modules"
checkdepends="xvfb-run"
source="https://download.kde.org/stable/frameworks/${pkgver%.*}/frameworkintegration-$pkgver.tar.xz"
subpackages="$pkgname-dev"

build() {
	cmake -B build \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

check() {
	cd build
	CTEST_OUTPUT_ON_FAILURE=TRUE xvfb-run ctest
}

package() {
	DESTDIR="$pkgdir" cmake --build build --target install
}

sha512sums="23366afa4ac57a9b642f93eac2a4bb31ca18afbc1073688bd9e95e317a9b0f3f7854311948ab962e536eea9d04a07411ac7bf1d5863fe79e7d82819761130cfd  frameworkintegration-5.73.0.tar.xz"
